package edu.utd.text.game.domain.areas;

/**
 * Directions:
 * a utility class for the Direction enumeration
 * @author troy
 *
 */
public class Directions {

	private Directions() { 
		//Do not instantiate
	}
	
	public static Direction getOppositeDirection(Direction direction) {
		switch (direction) 
		{
			case NORTH		: 	return Direction.SOUTH;
			case SOUTH		:	return Direction.NORTH;
			case EAST		:	return Direction.WEST;
			case WEST		:	return Direction.EAST;
			case NORTHEAST	:	return Direction.SOUTHWEST;
			case NORTHWEST	:	return Direction.SOUTHEAST;
			case SOUTHEAST	: 	return Direction.NORTHWEST;
			case SOUTHWEST	:	return Direction.NORTHEAST;
		}
		return null;
	}
}
